<?php
	$link=mysql_connect("localhost","root","root");
	if($link){
		echo "lianjiechenggong"."<br>";
	}
	mysql_select_db('ze');//数据库名
	mysql_query("set names utf8");//设置字符集编码
 
	$sql="select id,word from ze1";//查询语句
	$res=mysql_query($sql);//执行查询
	while($row=mysql_fetch_assoc($res)){
	    $rows[]=$row;//接受结果集
	}
	 
	//遍历数组
	foreach($rows as $key=>$v){
	    echo $v['id']."---".$v['word'];
	}

?>